const obj = {
  store: ['a', 'b', 'c'],
  [Symbol.iterator]: function () {//实现可迭代接口iterable
    let index = 0;
    const _this = this;
    return {//实现迭代器接口iterator
      next: function () {

        return {//实现迭代结果接口iterationResult
          value: _this.store[index],
          done: index++ >= _this.store.length,//表示迭代有没有结束
        }
      }
    }
  }
}

for (const item of obj) {
  console.log('循环', item);
}